home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / WINHOT.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  1004 b   |  50 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // MenuControl --> MenuItems --> FusionWindow
  8. //
  9.  
  10. #include "fliwin.h"
  11.  
  12. #ifdef __BCPLUSPLUS__
  13. #pragma hdrstop
  14. #endif
  15.  
  16. #include <string.h>
  17.  
  18. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  19. //
  20. // HotKey()
  21. //
  22. // Defines a new hotkey which cooresponds to a menu option
  23. //
  24. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  25.  
  26. void MenuItems::_HotKey(char *HotKeyOption,int HotKey)
  27. {
  28.   if (!NumberOfOptions)
  29.     return;
  30.  
  31.   _Options &Item=*(Option+NumberOfOptions-1);
  32.  
  33.   Item.HotKeyOption=HotKeyOption;
  34.   Item.HotKey=HotKey;
  35.  
  36.   HotKeys++;
  37. }
  38.  
  39. void MenuManager::HotKey(char *HotKeyOption,int HotKey)
  40. {
  41.   if (!NumberOfMenus)
  42.     return;
  43.  
  44.   if (!CurrentLevel)
  45.     Menus[NumberOfMenus-1]->_HotKey(HotKeyOption,HotKey);
  46.   else
  47.     SubMenuTrack[CurrentLevel-1]->_HotKey(HotKeyOption,HotKey);
  48. }
  49.  
  50.